import InfoModal from '@/pages/Task/components/InfoModal';
import { FILE_RENDER, REASON_RENDER, FORMAT_DATE, MINUTE_TO_WORK_STR } from './renderUtil';
import { fetchOperateDetails } from './util';
// 暂停详情
const columns = [
    {
        title: '实际开始时间',
        dataIndex: 'actualStartTime',
        render: FORMAT_DATE
    },
    {
        title: '已用工时',
        dataIndex: 'actualWorkDuration',
        require: true,
        render: MINUTE_TO_WORK_STR
    },
    {
        title: '当前进度',
        dataIndex: 'taskProgress',
        render: value => `${value}%`
    },
    {
        title: '原因',
        dataIndex: 'operateReason',
        require: true,
        render: REASON_RENDER
    },
    {
        title: '附件',
        dataIndex: 'taskOperateFile',
        render: FILE_RENDER
    }
];
export const showPauseInfoModal = async (id, operateRecordId) => {
    const dataSource = await fetchOperateDetails(id, operateRecordId);
    return InfoModal.showCommonModal({ columns, dataSource, title: '暂停详情' });
};
